package com.example.cookieshop.service;

import com.example.cookieshop.entity.User;
import com.example.cookieshop.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    UserMapper userMapper;

    public User login(String username, String password) {
        return userMapper.login(username, password);
    }

    public int register(User user) {
        return userMapper.register(user);
    }


    public int update(User user) {
        return userMapper.update(user);
    }
}
